load(
    "//tools:defaults.bzl",
    "ng_module",
    "ng_test_library",
    "ng_web_test_suite",
    "sass_binary",
    "sass_library",
)

package(default_visibility = ["//visibility:public"])

ng_module(
    name = "menubar",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = [
        ":menubar.css",
        ":menubar-item.css",
    ] + glob(["**/*.html"]),
    deps = [
        "//src/cdk/menu",
        "@npm//@angular/core",
    ],
)

sass_library(
    name = "menubar_scss_lib",
    srcs = glob(["**/_*.scss"]),
)

sass_binary(
    name = "menubar_scss",
    src = "menubar.scss",
)

sass_binary(
    name = "menubar_item_scss",
    src = "menubar-item.scss",
)

ng_test_library(
    name = "unit_test_sources",
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = ["**/*.e2e.spec.ts"],
    ),
    deps = [
        ":menubar",
        "//src/cdk/keycodes",
        "//src/cdk/menu",
        "//src/cdk/testing/private",
        "@npm//@angular/platform-browser",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_test_sources"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)
